import MFormItem from "../MFormItem";
import { Col, Input, Radio, Select, TreeSelect } from "antd";
import React from "react";

const { Option } = Select;

export const FormItem4Input = props => {
  const { disabled = false } = props;
  return (
    <Col className="gutter-row" span={12}>
      <MFormItem {...props}>
        <Input
          disabled={disabled}
          autoComplete="off"
          placeholder={"请输入"}
          style={{ width: "100%" }}
        ></Input>
      </MFormItem>
    </Col>
  );
};


export const FormItem4Select = props => {
  const { items, onChange, ...other } = props;
  return (
    <Col className="gutter-row" span={12}>
      <MFormItem {...other}>
        <Select
          onChange={onChange}
          allowClear={true}
          style={{ width: "100%" }}
          dropdownMatchSelectWidth={false}
        >
          {items &&
            items.map((item, index) => {
              return (
                <Option key={item.dictValue} value={item.dictValue}>
                  {item.dictName}
                </Option>
              );
            })}
        </Select>
      </MFormItem>
    </Col>
  );
};

